const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  points: state => state.user.userInfo && state.user.userInfo.roles.points,
  userId: state => state.user.userInfo && state.user.userInfo.userId,
  avatar: state => state.user.userInfo && state.user.userInfo.staffPhoto, // 建立用户头像的映射
  // name: state => state.user.name,
  username: state => state.user.userInfo && state.user.userInfo.username,
  routes: state => state.permission.routes // 导出当前的路由
}
export default getters
